Use makefile variables in a more standard manner#35
Open
0mp wants to merge 1 commit intodeadpixi:masterfrom
Open
Use makefile variables in a more standard manner#350mp wants to merge 1 commit intodeadpixi:masterfrom
0mp wants to merge 1 commit intodeadpixi:masterfrom
Conversation
In order to make mtm easier to compile on a variety of operating
systems, let's use more standard makefile flags:
- Use CFLAGS for compiler flags.
- Use CPPFLAGS for preprocessor flags.
- Use LDFLAGS for linker flags.
- Deprecate LIBS in favor of LIBRARIES. It is better to avoid the use of
LIBS for custom values as it is often used to store information for
the linker.
- Deprecate LIBPATH. Use LDFLAGS to specify directories to search for
libraries.
This way, for example, mtm can be compiled on FreeBSD with the following
command:
env CFLAGS="-I/usr/local/include -I/usr/local/include/ncurses" \
LDFLAGS=-L/usr/local/lib \
make clean all
Also, I did not touch the HEADERS variable as I do not understand its
purpose.
|
Using pkg-config would make it even easier. |
paulmenzel
reviewed
May 22, 2021
paulmenzel
left a comment
There was a problem hiding this comment.
Looks good, but needs to be rebased.
Note, loosely related merge/pull request #45 has also been submitted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to make mtm easier to compile on a variety of operating
systems, let's use more standard makefile flags:
LIBS for custom values as it is often used to store information for
the linker.
libraries.
This way, for example, mtm can be compiled on FreeBSD with the following
command:
Also, I did not touch the HEADERS variable as I do not understand its
purpose.